# mechanicalsoup是怎样与百度网站进行交互
import mechanicalsoup

browser = mechanicalsoup.StatefulBrowser()
browser.open('https://www.baidu.com')
browser.select_form()
browser.get_current_form().print_summary()
# 只需要填充最后一个input
browser['wd'] = '早起python'
browser.launch_browser()
browser.submit_selected()
page = browser.get_current_page()
print(page)
